package forJava;

import java.io.IOException;
import java.util.List;

/**
 * @author hanj.cn@outlook.com
 */
public class ObjectToXmlTest {

    public static void main(String[] args) throws IOException {

        ObjectToXmlUtil.objectToXml(new Cat("汤姆", "yellow", 23.5f), "D:\\桌面\\杂物\\receive.xml");
        List<Object> objects = ObjectToXmlUtil.xmlToObject("D:\\桌面\\杂物\\receive.xml");
        Cat cat = (Cat) objects.get(0);
        System.out.println(cat);
        cat.sayHello();
    }

}

